import java.util.Scanner;

public class demo02 {
    //数的划分
    public static int count=0;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
        func(n,1,k);
        System.out.println(count);
    }
    public static void func(int n,int num,int k){
        if(k==1&&n>=num){
            count++;
            return;
        }
        for (int i = 1; i <= n; i++) {
            if(i>=num){
                func(n-i,i,k-1);
            }
        }
    }
}